<?php
	require_once ('config/connection.php');
	/*$result = mysql_query("SELECT * FROM administrator");
        while($row=mysql_fetch_array($result))
        {
            mysql_query("INSERT INTO user_roles (user_id, role_id) VALUES(".$row["admin_id"].",(SELECT role_id FROM role_master WHERE role_name='".$row["admin_type"]."'))");
        }*/

       /* $result= mysql_query("SELECT * FROM vehicle WHERE delivery!=''");
        while($row=mysql_fetch_array($result))
        {
            if($row["status"]=="Now In Possession")
                $tow_status = 2;
            elseif($row["status"]=="Bid Accepted"||$row["status"]=="New Submission")
                $tow_status = 1;
               
            else
                $tow_status = 3;
            if($tow_status == 1)
                $is_read = 0;
            else
                $is_read = 1;
            
            echo "INSERT INTO vehicle_tow_status (vehicle_id, tower_id, tow_status, tow_is_read, assigned_by, assigned_date) VALUES(".$row["vehicle_id"].", ".$row["delivery"].", ".$tow_status.", ".$is_read.", (SELECT user_id FROM user_master WHERE first_name='".$row["assist_by"]."'), '".$row["update_date"]."')";
            mysql_query("INSERT INTO vehicle_tow_status (vehicle_id, tower_id, tow_status, tow_is_read, assigned_by, assigned_date) VALUES(".$row["vehicle_id"].", ".$row["delivery"].", ".$tow_status.", ".$is_read.", (SELECT user_id FROM user_master WHERE first_name='".$row["assist_by"]."'),'".$row["update_date"]."')") or die("Query ERROR");
        }*/
       /* mysql_query("UPDATE vehicle_backup as v SET v.delivery = (SELECT id FROM company WHERE company_name=v.delivery)")or die("Query ERROR");*/
        
?>